package SmartMeeting.commands;

import SmartMeeting.Entity.Meeting;
import SmartMeeting.bridges.PlatFormAPI;
import SmartMeeting.facades.MeetingSystem;

public class StartCommand implements Command {
    private MeetingSystem meetingSystem;
    private Meeting meeting;
    private PlatFormAPI platformAPI;
    private CreateCommand createCommand;
    private String type;
    
    public StartCommand(MeetingSystem meetingSystem, PlatFormAPI platformAPI, CreateCommand createCommand, String type) {
        this.meetingSystem = meetingSystem;
        this.platformAPI = platformAPI;
        this.createCommand = createCommand;// 获取创建的会议
        this.type = type;
    }
    
    @Override
    public void execute() {
        // 获取创建的会议
        this.meeting = createCommand.getCreatedMeeting();
        meetingSystem.startMeeting(meeting, type);
    }
    
    @Override
    public void undo() {
        System.out.println("撤销会议开始命令");
    }
}
